import unittest
from scripts.test_home import TestHome
from scripts.test_com import Testcom
from scripts.testUser import TestUser
from scripts.testOrder import TestOrder
import app
from lib.HTMLTestRunner_PY3 import HTMLTestRunner

suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(TestHome))
suite.addTest(unittest.makeSuite(Testcom))
suite.addTest(unittest.makeSuite(TestUser))
suite.addTest(unittest.makeSuite(TestOrder))

report = app.Base_dir + "/report/report.html"

with open(report, "wb")as f:
    runner = HTMLTestRunner(f, title="小程序报告")
    runner.run(suite)
